Optimal. Leaf size=204 \[ -\frac {\left (8 a^2+9 a b+3 b^2\right ) \log (1-\sin (c+d x))}{16 (a+b)^3 d}-\frac {\left (8 a^2-9 a b+3 b^2\right ) \log (1+\sin (c+d x))}{16 (a-b)^3 d}+\frac {a^5 \log (a+b \sin (c+d x))}{\left (a^2-b^2\right )^3 d}+\frac {\sec ^4(c+d x) (a-b \sin (c+d x))}{4 \left (a^2-b^2\right ) d}-\frac {\sec ^2(c+d x) \left (4 a \left (2 a^2-b^2\right )-b \left (9 a^2-5 b^2\right ) \sin (c+d x)\right )}{8 \left (a^2-b^2\right )^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.28, antiderivative size = 204, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2800, 1661,
815} \begin {gather*} -\frac {\left (8 a^2+9 a b+3 b^2\right ) \log (1-\sin (c+d x))}{16 d (a+b)^3}-\frac {\left (8 a^2-9 a b+3 b^2\right ) \log (\sin (c+d x)+1)}{16 d (a-b)^3}+\frac {\sec ^4(c+d x) (a-b \sin (c+d x))}{4 d \left (a^2-b^2\right )}-\frac {\sec ^2(c+d x) \left (4 a \left (2 a^2-b^2\right )-b \left (9 a^2-5 b^2\right ) \sin (c+d x)\right )}{8 d \left (a^2-b^2\right )^2}+\frac {a^5 \log (a+b \sin (c+d x))}{d \left (a^2-b^2\right )^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 815
Rule 1661
Rule 2800
Rubi steps
\begin {align*} \int \frac {\tan ^5(c+d x)}{a+b \sin (c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {x^5}{(a+x) \left (b^2-x^2\right )^3} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\sec ^4(c+d x) (a-b \sin (c+d x))}{4 \left (a^2-b^2\right ) d}+\frac {\text {Subst}\left (\int \frac {\frac {a b^6}{a^2-b^2}-\frac {b^4 \left (4 a^2-b^2\right ) x}{a^2-b^2}-4 b^2 x^3}{(a+x) \left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{4 b^2 d}\\ &=\frac {\sec ^4(c+d x) (a-b \sin (c+d x))}{4 \left (a^2-b^2\right ) d}-\frac {\sec ^2(c+d x) \left (4 a \left (2 a^2-b^2\right )-b \left (9 a^2-5 b^2\right ) \sin (c+d x)\right )}{8 \left (a^2-b^2\right )^2 d}+\frac {\text {Subst}\left (\int \frac {-\frac {a b^6 \left (7 a^2-3 b^2\right )}{\left (a^2-b^2\right )^2}+\frac {b^4 \left (8 a^4-7 a^2 b^2+3 b^4\right ) x}{\left (a^2-b^2\right )^2}}{(a+x) \left (b^2-x^2\right )} \, dx,x,b \sin (c+d x)\right )}{8 b^4 d}\\ &=\frac {\sec ^4(c+d x) (a-b \sin (c+d x))}{4 \left (a^2-b^2\right ) d}-\frac {\sec ^2(c+d x) \left (4 a \left (2 a^2-b^2\right )-b \left (9 a^2-5 b^2\right ) \sin (c+d x)\right )}{8 \left (a^2-b^2\right )^2 d}+\frac {\text {Subst}\left (\int \left (\frac {b^4 \left (8 a^2+9 a b+3 b^2\right )}{2 (a+b)^3 (b-x)}+\frac {8 a^5 b^4}{(a-b)^3 (a+b)^3 (a+x)}+\frac {b^4 \left (8 a^2-9 a b+3 b^2\right )}{2 (-a+b)^3 (b+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{8 b^4 d}\\ &=-\frac {\left (8 a^2+9 a b+3 b^2\right ) \log (1-\sin (c+d x))}{16 (a+b)^3 d}-\frac {\left (8 a^2-9 a b+3 b^2\right ) \log (1+\sin (c+d x))}{16 (a-b)^3 d}+\frac {a^5 \log (a+b \sin (c+d x))}{\left (a^2-b^2\right )^3 d}+\frac {\sec ^4(c+d x) (a-b \sin (c+d x))}{4 \left (a^2-b^2\right ) d}-\frac {\sec ^2(c+d x) \left (4 a \left (2 a^2-b^2\right )-b \left (9 a^2-5 b^2\right ) \sin (c+d x)\right )}{8 \left (a^2-b^2\right )^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.93, size = 184, normalized size = 0.90 \begin {gather*} \frac {-\frac {\left (8 a^2+9 a b+3 b^2\right ) \log (1-\sin (c+d x))}{(a+b)^3}-\frac {\left (8 a^2-9 a b+3 b^2\right ) \log (1+\sin (c+d x))}{(a-b)^3}+\frac {16 a^5 \log (a+b \sin (c+d x))}{(a-b)^3 (a+b)^3}+\frac {1}{(a+b) (-1+\sin (c+d x))^2}+\frac {7 a+5 b}{(a+b)^2 (-1+\sin (c+d x))}+\frac {1}{(a-b) (1+\sin (c+d x))^2}+\frac {-7 a+5 b}{(a-b)^2 (1+\sin (c+d x))}}{16 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.43, size = 189, normalized size = 0.93
method | result | size |
derivativedivides | \(\frac {\frac {1}{2 \left (8 a -8 b \right ) \left (1+\sin \left (d x +c \right )\right )^{2}}-\frac {7 a -5 b}{16 \left (a -b \right )^{2} \left (1+\sin \left (d x +c \right )\right )}+\frac {\left (-8 a^{2}+9 a b -3 b^{2}\right ) \ln \left (1+\sin \left (d x +c \right )\right )}{16 \left (a -b \right )^{3}}+\frac {a^{5} \ln \left (a +b \sin \left (d x +c \right )\right )}{\left (a +b \right )^{3} \left (a -b \right )^{3}}+\frac {1}{2 \left (8 a +8 b \right ) \left (\sin \left (d x +c \right )-1\right )^{2}}-\frac {-7 a -5 b}{16 \left (a +b \right )^{2} \left (\sin \left (d x +c \right )-1\right )}+\frac {\left (-8 a^{2}-9 a b -3 b^{2}\right ) \ln \left (\sin \left (d x +c \right )-1\right )}{16 \left (a +b \right )^{3}}}{d}\) | \(189\) |
default | \(\frac {\frac {1}{2 \left (8 a -8 b \right ) \left (1+\sin \left (d x +c \right )\right )^{2}}-\frac {7 a -5 b}{16 \left (a -b \right )^{2} \left (1+\sin \left (d x +c \right )\right )}+\frac {\left (-8 a^{2}+9 a b -3 b^{2}\right ) \ln \left (1+\sin \left (d x +c \right )\right )}{16 \left (a -b \right )^{3}}+\frac {a^{5} \ln \left (a +b \sin \left (d x +c \right )\right )}{\left (a +b \right )^{3} \left (a -b \right )^{3}}+\frac {1}{2 \left (8 a +8 b \right ) \left (\sin \left (d x +c \right )-1\right )^{2}}-\frac {-7 a -5 b}{16 \left (a +b \right )^{2} \left (\sin \left (d x +c \right )-1\right )}+\frac {\left (-8 a^{2}-9 a b -3 b^{2}\right ) \ln \left (\sin \left (d x +c \right )-1\right )}{16 \left (a +b \right )^{3}}}{d}\) | \(189\) |
risch | \(\frac {3 i b^{2} x}{8 \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}+\frac {i \left (16 i a^{3} {\mathrm e}^{6 i \left (d x +c \right )}-8 i a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}-9 a^{2} b \,{\mathrm e}^{7 i \left (d x +c \right )}+5 b^{3} {\mathrm e}^{7 i \left (d x +c \right )}+16 i a^{3} {\mathrm e}^{4 i \left (d x +c \right )}-a^{2} b \,{\mathrm e}^{5 i \left (d x +c \right )}-3 b^{3} {\mathrm e}^{5 i \left (d x +c \right )}+16 i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}-8 i a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+a^{2} b \,{\mathrm e}^{3 i \left (d x +c \right )}+3 b^{3} {\mathrm e}^{3 i \left (d x +c \right )}+9 a^{2} b \,{\mathrm e}^{i \left (d x +c \right )}-5 b^{3} {\mathrm e}^{i \left (d x +c \right )}\right )}{4 \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \left (1+{\mathrm e}^{2 i \left (d x +c \right )}\right )^{4} d}+\frac {3 i b^{2} c}{8 d \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}-\frac {2 i a^{5} x}{a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}}-\frac {2 i a^{5} c}{d \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right )}+\frac {i a^{2} x}{a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}}+\frac {3 i b^{2} x}{8 \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}+\frac {i a^{2} c}{d \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}+\frac {i a^{2} x}{a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}}+\frac {i a^{2} c}{d \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}+\frac {9 i a b c}{8 d \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}-\frac {9 i a b c}{8 d \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}-\frac {9 i a b x}{8 \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}+\frac {9 i a b x}{8 \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}+\frac {3 i b^{2} c}{8 d \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a^{2}}{d \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}+\frac {9 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a b}{8 d \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b^{2}}{8 d \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a^{2}}{d \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}-\frac {9 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a b}{8 d \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b^{2}}{8 d \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}+\frac {a^{5} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}-1\right )}{d \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right )}\) | \(982\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.31, size = 288, normalized size = 1.41 \begin {gather*} \frac {\frac {16 \, a^{5} \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}} - \frac {{\left (8 \, a^{2} - 9 \, a b + 3 \, b^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right )}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} - \frac {{\left (8 \, a^{2} + 9 \, a b + 3 \, b^{2}\right )} \log \left (\sin \left (d x + c\right ) - 1\right )}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} - \frac {2 \, {\left ({\left (9 \, a^{2} b - 5 \, b^{3}\right )} \sin \left (d x + c\right )^{3} + 6 \, a^{3} - 2 \, a b^{2} - 4 \, {\left (2 \, a^{3} - a b^{2}\right )} \sin \left (d x + c\right )^{2} - {\left (7 \, a^{2} b - 3 \, b^{3}\right )} \sin \left (d x + c\right )\right )}}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sin \left (d x + c\right )^{4} + a^{4} - 2 \, a^{2} b^{2} + b^{4} - 2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sin \left (d x + c\right )^{2}}}{16 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.49, size = 261, normalized size = 1.28 \begin {gather*} \frac {16 \, a^{5} \cos \left (d x + c\right )^{4} \log \left (b \sin \left (d x + c\right ) + a\right ) - {\left (8 \, a^{5} + 15 \, a^{4} b - 10 \, a^{2} b^{3} + 3 \, b^{5}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (8 \, a^{5} - 15 \, a^{4} b + 10 \, a^{2} b^{3} - 3 \, b^{5}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 4 \, a^{5} - 8 \, a^{3} b^{2} + 4 \, a b^{4} - 8 \, {\left (2 \, a^{5} - 3 \, a^{3} b^{2} + a b^{4}\right )} \cos \left (d x + c\right )^{2} - 2 \, {\left (2 \, a^{4} b - 4 \, a^{2} b^{3} + 2 \, b^{5} - {\left (9 \, a^{4} b - 14 \, a^{2} b^{3} + 5 \, b^{5}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{16 \, {\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} d \cos \left (d x + c\right )^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\tan ^{5}{\left (c + d x \right )}}{a + b \sin {\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 15.80, size = 343, normalized size = 1.68 \begin {gather*} \frac {\frac {16 \, a^{5} b \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{6} b - 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} - b^{7}} - \frac {{\left (8 \, a^{2} - 9 \, a b + 3 \, b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}} - \frac {{\left (8 \, a^{2} + 9 \, a b + 3 \, b^{2}\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}} + \frac {2 \, {\left (6 \, a^{5} \sin \left (d x + c\right )^{4} - 9 \, a^{4} b \sin \left (d x + c\right )^{3} + 14 \, a^{2} b^{3} \sin \left (d x + c\right )^{3} - 5 \, b^{5} \sin \left (d x + c\right )^{3} - 4 \, a^{5} \sin \left (d x + c\right )^{2} - 12 \, a^{3} b^{2} \sin \left (d x + c\right )^{2} + 4 \, a b^{4} \sin \left (d x + c\right )^{2} + 7 \, a^{4} b \sin \left (d x + c\right ) - 10 \, a^{2} b^{3} \sin \left (d x + c\right ) + 3 \, b^{5} \sin \left (d x + c\right ) + 8 \, a^{3} b^{2} - 2 \, a b^{4}\right )}}{{\left (a^{6} - 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )} {\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{16 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 7.43, size = 498, normalized size = 2.44 \begin {gather*} \frac {a^5\,\ln \left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )}{d\,\left (a^6-3\,a^4\,b^2+3\,a^2\,b^4-b^6\right )}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,\left (\frac {1}{a+b}-\frac {7\,b}{8\,{\left (a+b\right )}^2}+\frac {b^2}{4\,{\left (a+b\right )}^3}\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )\,\left (\frac {b^2}{4\,{\left (a-b\right )}^3}+\frac {7\,b}{8\,{\left (a-b\right )}^2}+\frac {1}{a-b}\right )}{d}-\frac {\frac {2\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{a^4-2\,a^2\,b^2+b^4}+\frac {2\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{a^4-2\,a^2\,b^2+b^4}+\frac {4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (a\,b^2-2\,a^3\right )}{a^4-2\,a^2\,b^2+b^4}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (7\,a^2\,b-3\,b^3\right )}{4\,\left (a^4-2\,a^2\,b^2+b^4\right )}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (15\,a^2\,b-11\,b^3\right )}{4\,\left (a^4-2\,a^2\,b^2+b^4\right )}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (15\,a^2\,b-11\,b^3\right )}{4\,\left (a^4-2\,a^2\,b^2+b^4\right )}-\frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (7\,a^2-3\,b^2\right )}{4\,\left (a^4-2\,a^2\,b^2+b^4\right )}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________